{% extends 'layout.html' %}
{% block content %}
<div class="container">
<form class="form-horizontal" method="post" novalidate>
  {% csrf_token %}
  <table class="table table-bordered table-hover">
    <caption>手机参数信息&nbsp;&nbsp;<button type="submit" class="btn btn-primary btn-xs">保存</button></caption>
    <thead>
      <tr class="row">
        <th class="col-md-3">手机名称</th>
        <th class="col-md-9">参数</th>
      </tr>
    </thead>
    <tbody>
    {% for field in form %}
      <tr class="row">
        <th class="col-md-3" style="vertical-align: middle;">
          <label>{{field.label|upper}}</label>
        </th>
          <td class="col-md-9">
            {{field}}
          <span style="color: red;">{{field.errors}}</span>
          </td>
      </tr>
    {% endfor %}
    </tbody>
  </table>
  <button type="submit" class="btn btn-primary">提交</button>
</form>
</div>
{% endblock %}